<form action="<?php echo $this->action; ?>" method="post" id=id="frm_<?php echo $this->validacao; ?>">
<fieldset>
<legend>Dados da consulta</legend>
<div>
<ul>
	<li><label class="description">Evento</label>
		<div>
			<select class="element select large" name="id_evento_filtro" id="id_evento_filtro">
		    <?php echo UtilController::getOptionEvento($this->evento, 1, 2); ?>
		    </select>
		</div>
	</li>

	<li><label class="description">Categoria</label>
		<div>
	        <select name="categoria" id="categoria" class="element select large">
	        <?php echo UtilController::getOptionCategoria($this->categoria, 1);?>
	      	</select>
            <p class="guidelines"><small>Selecionar a categoria do participante a ser consultado.</small></p>
		</div>	
	</li>
	<li><label class="description">Participante</label>
		<div>
			<input type="text" name="empresa" id="empresa" class="element text large" value="<?php echo $this->empresa;?>">
			<label>Nome da empresa participante</label>
		</div>  
		<div>
			<input type="text" name="participante" id="participante" class="element text large" value="<?php echo $this->participante;?>">
			<label>Nome da pessoa participante</label>
		</div>		
	 	<div>
    		<select name="fumtur" id="fumtur" class="element select large" >
	        <?php echo UtilController::getOptionFumturPorEvento(0, $this->evento_filtro->id_evento, $this->Fumtur);?>
	      	</select>	
	 	</div>
	 	<p class="guidelines"><small><?php echo ModelController::getDetalheMensagem(8);?></small></p>
	</li>	
	<li><label class="description">Status</label>
		<div>
		<select name="status" id="status" class="element select large"> 
		<?php echo UtilController::getOptionStatus($this->status, 1);?> 
		</select>
		</div>
	</li>
	<li>
		<div>
		<input type="submit" name="btConsultar" id="btConsultar" value="Consultar"/>
		</div>
	</li>
</ul>
</div>
</fieldset>
    
    
    <?php echo UtilController::getTableStatus();?>
		<?php if ($this->dadosConsulta != null && count($this->dadosConsulta) > 0) {
			$this->Grid($this->dadosConsulta,                 //$data
						array('Status'       =>'id_status',    //$coluns
							  'Empresa'      =>'ds_fantasia',
							  'Categoria'    =>'id_categoria_acesso',
							  'Participante' =>'fisica',
						      'Origem'   =>'localidade'),
						array('id' => 'lista_valida_participante', //$attrs
							  'width'       => '100%',
							  'id'			=>'mytable',
							  'class'		=>'tablesorter'),     
						array('tipo_selecao'=>'selecaoMultipla'),//$checkBox
						array('otherFunctionGet1'   => 'validar?id_acesso=',
							  'detalhesFunctionAjax'=> 'detalhar',
							  'deleteFunctionGet'   => 'excluir?id_acesso='),
						1//Ordenar
						);
		} ?>
</form>


<form name="frm_lista" id="frm_lista" method="post" onsubmit="return verForm(document.frm_validar, document.frm_lista.checkSel);">
	<?php if ($this->dadosConsulta != null && count($this->dadosConsulta) > 0) {?>
	<div id="manter_consultar"></div>
	<table width="100%" align="left">
	<?php echo UtilController::getTableStatus();?>
	</table>
	<table id="item" class="table displaytag">

		<thead>
	    <tr>

	      <th class="sortable"><input name="CheckUnCheckAll" id="CheckUnCheckAll" type="checkbox"  value="1" onchange="checkUncheckAll(document.frm_lista.checkSel, document.frm_lista.CheckUnCheckAll)" title="Selecionar todos os participantes"/></th>
		  <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "8", $this->asc);?>">Status</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "1", $this->asc);?>">Empresa</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "2", $this->asc);?>">Categoria</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "3", $this->asc);?>">Participante</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "4", $this->asc);?>">Email</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "5", $this->asc);?>">Sexo</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "6", $this->asc);?>">Cidade</a></th>
	      <th class="sortable"><a href="<?php echo UtilController::trataLinkOrdenacao($this->urlRetornoOrdenacao, $this->ordemAtual, "7", $this->asc);?>">Estado</a></th>
	      <th class="sortable">&nbsp;</th>
	      <th class="sortable">&nbsp;</th>
	      <th class="sortable">&nbsp;</th>
	    </tr>
	    </thead>
	    <tbody>
	    <?php $grid = 0;
	     foreach($this->dadosConsulta as $item) :
	     $classgrid = $grid % 2 == 0 ? "row_off" : "row_on";
	     $grid++;
	     ?>
	    <tr class="<?php echo $classgrid;?>" onMouseOver="this.style.backgroundColor='#FFF4B7';" onMouseOut="this.style.backgroundColor='';">
	      <td width=20px><input name="check[]" id="checkSel" type="checkbox"  value="<?php echo $item['id_acesso']; ?>"/></td>
	      <td align="center"><?php echo UtilController::getCorStatus($item['status'], $item['ds_status']);?>
	      <td><?php echo $item['empresa'];?></td>
	      <td><?php echo $item['categoria'];?></td>
	      <td><?php echo $item['participante'];?></td>
	      <td><?php echo $item['email'];?></td>
	      <td><?php echo $item['sexo'];?></td>
	      <td><?php echo $item['cidade'];?></td>
	      <td><?php echo $item['estado'];?></td>
		  <td width=20px><a href="<?php echo $this->baseUrl; ?>/fisica/edit/id/<?php echo $item['id_fisica'];?>"><img src="/bntmercosul/public/images/edit.png" border="0"></a></td>
	      <td width=20px><a href="excluir<?php echo UtilController::trataLinkOrdenacao($this->parametrosConsulta, $this->ordemAtual, $this->ordemAtual, $this->asc)."&id_acesso=".$item['id_acesso'];?>" title="Remover da lista de participação!" onClick="return confirmar_remocao();"> <img src="/bntmercosul/public/images/remove.png"></a></td>
		  <td width=20px><a href="validar<?php echo UtilController::trataLinkOrdenacao($this->parametrosConsulta, $this->ordemAtual, $this->ordemAtual, $this->asc)."&id_acesso=".$item['id_acesso'];?>" title="Validar participante!">				<img src="/bntmercosul/public/images/ok.png"></img></a></td>
	    </tr>
	    <?php endforeach; ?>
		</tbody>
		<tr>
		    <td colspan="5">
		    <img src="/bntmercosul/public/images/arrow_left.png" border="0">

		    <button class="mult_submit" title="Remover todos selecionados" value="excluir" id="submit_mult" name="submit_mult" type="submit" onclick=" return setarActionExcluir();">
			<img class="icon" alt="Remover" width="18" height="18" title="Remover" src="/bntmercosul/public/images/remove.png">
			</button>

		    <button class="mult_submit" title="Validar todos selecionados" value="validar" id="submit_mult" name="submit_mult" type="submit" onclick=" return setarActionValidar();">
			<img class="icon" alt="Validar" width="18" height="18" title="Validar" src="/bntmercosul/public/images/ok.png">
			</button>
			<td colspan="5" align="right"><b><?php echo count($this->dadosConsulta);?> registros</b></td>
		 </tr>
	  </table>
	<?php   }?>
</form>


